Compact decoding of punctured codes

ABSTRACT

k information bits are encoded according to a code with which is associated a parity check matrix H that has n columns. The entire resulting codeword is stored in a storage medium. At least n′&lt;n bits of a representation of the codeword are read from the storage medium and an attempt is made to decode only the n′ bits using a matrix H′ that has fewer columns than H. Typically, H has m=n−k rows and H′ has m−(n−n′) rows and n′ columns. If the attempt fails, one or more additional bits are read from the storage medium, if necessary, and are combined with the n′ bits, and the decoding attempt is repeated using a matrix H′″ that has more columns than H′.

This is a continuation-in-part of U.S. patent application Ser. No. 12/506,342, filed Jul. 21, 2009

FIELD AND BACKGROUND OF THE INVENTION

The present invention relates to punctured codes and, more particularly, to methods and devices for efficient decoding of punctured codewords.

A common conventional error control strategy, on lime-varying channels, is to adapt the rate according to available channel state information (CSI), which is called rate adaptability. An effective way to realize this coding strategy is to use a single code and to puncture the code in a rate-compatible fashion, a so-called rate-compatible punctured code (RCPC). In such an approach, the transmitter systematically punctures parity bits in a codeword, and the locations of the punctured symbols are known to the receiver/receivers. Since the decoder for the lowest rate (the base code) is compatible with the decoders for the other higher rates, RCPC needs no additional complexity for the rate adaptability. Moreover, RCPC permits one to transmit redundancies progressively in conjunction with automatic repeat request (ARQ)

Consider a linear block code defined by a generator matrix Γ. To encode an information vector b, Γ is right-multiplied by b to produce a codeword vector c:

c=bΓ  (1)

Associated with Γ are one or more parity check matrices H that satisfy the matrix equation

Hc=0  (2)

for all the codeword vectors c of the code, i.e. a vector c belongs to the code if the vector satisfies equation (2). Typically, Γ, H and c are defined over the field GF(2), i.e. the elements of Γ, H and c are 0 or 1, and the addition of field elements is done as integer addition modulo 2.

In many cases, such as when Rate-Compatible Punctured Codes (RCPC) are being implemented, only a portion of the bits of the codeword c are transmitted over the channel, (in a communications scenario), or stored in a memory device, (storage applications). The locations of the transmitted bits are assumed to be known to both the transmitter and receiver, (of the communication system or storage device). Denote the transmitted or stored bits by c′ and refer to c′ as a sub-codeword. c′ also is referred to herein as a “punctured codeword”. The bits of c that are excluded from c′ are referred to herein as “punctured bits”. The bits received by the communications receiver, (or read by the memory reading device), typically are a noisy version of c′ that is referred to herein as a “representation” of c′, but by reuse of notation the received sub-codeword will still be denoted by c′.

The conventional method for decoding of c, given the representation of the sub-codeword c′, is by treating the punctured bits of c as “erasures”: during decoding, bits are inserted into c′ to bring the number of bits of c′ back up to the full number of bits of c, and then decoding is performed by decoding the code of the original matrix equation (2) while assigning special values (“erasures”) to the inserted bits. This procedure for decoding punctured codewords is referred to herein as “erasure decoding”.

To provide a concrete example of erasure decoding, Low-Density Parity Check (LDPC) codes now will be described.

A LDPC code is a linear binary block code whose parity-check matrix or matrices H is/are sparse. As shown in FIG. 1, a LDPC parity check matrix H is equivalent to a sparse bipartite “Tanner graph” G=(V, C, E) with a set V of N bit nodes (N=13 in FIG. 1), a set C of M check nodes (M=10 in FIG. 1) and a set E of edges (E=38 in FIG. 1) connecting bit nodes to check nodes. The bit nodes correspond to the codeword bits and the check nodes correspond to parity-check constraints on the bits. A bit node is connected by edges to the check nodes that the bit node participates with. In the matrix representation (matrix H of equation (2)) of the code on the left side of FIG. 1 an edge connecting bit node i with check node j is depicted by a non-zero matrix element at the intersection of row j and column i.

Next to the first and last check nodes of FIG. 1 are shown the equivalent rows of equation (1). The symbol “⊕” means “XOR”.

LDPC codes can be decoded using iterative message passing decoding algorithms. These algorithms operate by exchanging messages between bit nodes and check nodes along the edges of the underlying bipartite graph that represents the code. The decoder is provided with initial estimates of the codeword bits (based on the communication channel output or based on the read memory content). These initial estimates are refined and improved by imposing the parity-check constraints that the bits should satisfy as a valid codeword (according to equation (2)). This is done by exchanging information between the bit nodes representing the codeword bits and the check nodes representing parity-check constraints on the codeword bits, using the messages that are passed along the graph edges.

In iterative decoding algorithms, it is common to utilize “soft” bit estimations, which convey both the bit estimations and the reliabilities of the bit estimations.

The bit estimations conveyed by the messages passed along the graph edges can be expressed in various forms. A common measure for expressing a “soft” estimation of a bit v is as a Log-Likelihood Ratio (LLR)

${\log \frac{\Pr \left( {v = \left. 0 \middle| {{current}\mspace{14mu} {constraints}\mspace{14mu} {and}\mspace{14mu} {observations}} \right.} \right)}{\Pr \left( {v = \left. 1 \middle| {{current}\mspace{14mu} {constraints}\mspace{14mu} {and}\mspace{14mu} {observations}} \right.} \right)}},$

where the “current constraints and observations” are the various parity-check constraints taken into account in computing the message at hand and observations, such as the sequence of symbols received from a communication channel, corresponding to the bits participating in these parity checks. The sign of the LLR provides the bit estimation (i.e., positive LLR corresponds to v=0 and negative LLR corresponds to v=1). The magnitude of the LLR provides the reliability of the estimation (i.e., |LLR|=0 means that the estimation is completely unreliable and |LLR|=±∞ means that the estimation is completely reliable and the bit value is known).

Returning now to the discussion of decoding a punctured codeword by “erasure decoding”, if H is the parity-check matrix of an LDPC code, then the decoding is performed according to the Tanner graph associated with H, while assigning LLR=0 as an initial LLR to all the bits of the codeword c which are not bits of the sub-codeword c′ (i.e., to all the punctured bits of c).

Such erasure decoding may also be applied to other types of codes such as BCH codes.

In general, “erasure decoding” is more complex, and converges slower than, ordinary decoding. Moreover, typically the code is a systematic code, that encodes the input data bits as the codeword c by appending redundancy bits to the data bits, and the punctured bits are selected from among the redundancy bits, thus there is no real need to decode the punctured bits. A method that directly decodes the sub-codeword c′ and extracts the information bits, (which are typically the same as the information bits of c), would be of a significant benefit.

DEFINITIONS

The methodology described herein is applicable to encoding and decoding punctured codewords in at least two different circumstances. One circumstance is the storing of data in a storage medium, followed by the retrieving of the data from the storage medium. The other circumstance is the transmitting of data to a transmission medium, followed by the receiving of the data from the transmission medium. Therefore, the concepts of “storing” and “transmitting” of data are generalized herein to the concept of “exporting” data, and the concepts of “retrieving” and “receiving” data are generalized herein to the concept of “importing” data. Both “storing” data and “transmitting” data thus are special cases of “exporting” data, and both “retrieving” data and “receiving” data are special cases of “importing” data. The process of “exporting” data and then optionally “importing” the data is termed herein “porting” data.

The usual instantiation of a storage medium is as a memory. The usual instantiation of a transmission medium is as a communication channel. Both the storage medium and the transmission medium are examples of “corrupting” media. A “corrupting” medium is a medium that may introduce errors to data that are exported to the medium, so that the corresponding imported data may not be identical to the exported data.

“Encoding” is understood herein to mean turning an information vector (“b” in equation (1)) into a codeword (“c” in equation (1)). “Decoding” is understood herein to mean turning a representation of a codeword into the originally encoded information vector. It is a “representation” of the codeword, as imported from a corrupting medium, that is decoded, and not the codeword itself, because what is imported may be corrupted by noise relative to what is exported. Strictly speaking, the matrix H, or the equivalent Tanner graph as used in decoding by message passing, is used only to reconstruct the original codeword, not to provide the original information vector, but given the original codeword, it is well-known in the art how to recover the original information vector. Indeed, in the case of a systematic code, it is trivial to recover the original information vector because the codeword is just a concatenation of the original information vector and parity bits. In the appended claims, it is to be understood that using a matrix to decode a representation of a codeword means using the matrix to the extent that the matrix can be used to decode the representation of the codeword.

SUMMARY OF THE INVENTION

One embodiment provided herein is a method of storing and retrieving k information bits, including: (a) encoding the information bits according to a code with which is associated a parity check matrix H that has n columns, thereby producing a codeword of n bits; (b) storing the entire codeword in a storage medium; (c) reading at least n′<n bits of a representation of the codeword from the storage medium; and (d) attempting to decode only the n′ bits of the representation of the codeword using a matrix H′ that has fewer columns than H.

Another embodiment provided herein is a memory device, including: (a) a memory; and (b) a controller for storing information bits in the memory and for recovering the information bits from the memory, the controller including: (i) an encoder for encoding the information bits according to a code with which is associated a parity check matrix H that has n columns, thereby producing a codeword of n bits, (ii) circuitry for storing the entire codeword in the memory and for reading at least n′<n bits of a representation of the codeword from the memory, and (iii) a decoder for attempting to decode only the n′<n bits of the representation of the codeword, the decoding being effected using a matrix H′ that has fewer columns than H.

Another embodiment provided herein is a system including: (a) a first memory; and (b) a host of the first memory including: (i) a second memory having stored therein code for managing the first memory by steps including: (A) encoding information bits according to a code with which is associated a parity check matrix H that has n columns, thereby producing a codeword of n bits, (B) storing the entire codeword in the first memory, (C) reading at least n′<n bits of a representation of the codeword from the first memory, and (D) attempting to decode only the n′ bits of the representation of the codeword using a matrix H′ that has fewer columns than H, and (ii) a processor for executing the code.

Another embodiment provided herein is a computer-readable storage medium having embodied thereon computer-readable code for managing a memory, the computer-readable code including: (a) program code for encoding information bits according to a code with which is associated a parity check matrix H that has n columns, thereby producing a codeword of n bits; (b) program code for storing the entire codeword in the memory; (c) program code for reading at least n′<n bits of a representation of the codeword from the memory; and (d) program code for attempting to decode only the n′ bits of the representation of the codeword using a matrix H′ that has fewer columns than H.

Another embodiment provided herein is a method of recovering k information bits that have been encoded as a codeword of n bits according to a code with which is associated a parity check matrix H that has n columns, the entire codeword having been stored in a storage medium, the method including: (a) reading at least n′<n bits of a representation of the codeword from the storage medium; and (b) attempting to decode only the n′ bits of the representation of the codeword using a matrix H′ that has fewer columns than H.

Another embodiment provided herein is a decoder for decoding a codeword of n bits, the codeword having been produced by encoding information bits according to a code with which is associated a parity check matrix that has n columns, the entire codeword having been stored in a storage medium, at least n′<n bits of a representation of the codeword having been read from the storage medium, the decoder including: (a) a decoding module for attempting to decode only the n′ bits of the representation of the codeword using a matrix H′ that has fewer columns than H.

In the most general embodiment of a method of storing and retrieving k information bits, the information bits are encoded according to a first code with which is associated a m×n parity check matrix, where m≧n−k. Normally, m=n−k; but a larger parity check matrix could be constructed from a (n−k)×n parity check matrix e.g. by adding one or more additional rows that is/are (a) linear combination(s) of the original n−k rows.) The encoding produces a codeword of n bits. The entire codeword is stored in a storage medium. At least n′<n bits (and possibly all n bits) of a representation of the codeword are read from the storage medium. An attempt is made to decode only the n′ bits of the representation of the codeword using a matrix H′ that has fewer columns than H.

Preferably, the first code is a block code.

Preferably, H′ is a parity check matrix of a second code.

Preferably, the decoding includes exchanging messages between the rows of H′ and the columns of H′.

Preferably, m=n−k and H′ has m′=m−(n−n′) rows and n′ columns. More preferably, the method also includes deriving H′ from H. Most preferably, the derivation of H′ from H includes performing Gaussian elimination on H, for example in order to set equal to zero the first m′ elements of the columns of H that correspond to the n−n′ bits of the codeword that are not read from the storage medium, in which case H′ is m′ rows of the resulting matrix without the zeroed-out columns.

Preferably, if the attempt to decode only the n′ bits of the representation of the codeword using H′ fails, then an attempt is made to decode the originally read n′ bits together with one or more additional bits of the representation of the codeword, using a matrix H′″ that has more columns than H′. If necessary, the one or more additional bits of the representation of the codeword are read from the storage medium. If all n−n′ remaining bits of the representation of the codeword have been read from the storage medium (either initially or subsequent to the failure of the attempt to decode the n′ bits of the representation of the codeword) and have been combined with the n′ originally read bits, then H′″ is identical to H. Otherwise, H′″ has fewer columns than H.

A memory device that uses the method for storing and retrieving k information bits includes a memory and a controller. The controller stores the information bits in the memory and recovers the information bits from the memory. The controller includes an encoder, storing and retrieving circuitry, and a decoder. The encoder encodes the information bits according to the matrix H to provide a codeword of n bits. The storing and retrieving circuitry stores the entire codeword in the memory and reads at least n′<n bits of a representation of the codeword from the memory. The decoder uses the matrix H′ to attempt to decode only the n′ bits of the representation of the codeword.

A system that uses the method for storing and retrieving k information bits includes a first memory and a host of the first memory. The host includes a second memory and a processor. The second memory has stored therein code for managing the first memory according to the method for storing and retrieving k information bits. The processor is for executing the code. Preferably, the second memory also has stored therein code for deriving H′ from H.

The scope of the appended claims also includes a computer-readable storage medium having embodied thereon computer-readable code for managing such a first memory according to the method for storing and retrieving k information bits. Preferably, the computer-readable storage medium also has embedded thereon code for deriving H′ from H.

In the most general embodiment of a method of recovering k information bits that have been encoded as a codeword of n bits according to a code with which is associated a parity check matrix H that has n columns and m≧n−k rows, with the entire codeword having been stored in a storage medium, at least n′<n bits of a representation of the codeword are read from the storage medium, and an attempt is made to decode only the n′ bits of the representation of the codeword using a matrix H′ that has fewer columns than H.

Preferably, the code is a block code.

Preferably, the decoding includes exchanging messages between the rows of H′ and the columns of H′.

Preferably, m=n−k and H′ has m′=m−(n−n′) rows and n′ columns. More preferably, the method also includes deriving H′ from H. Most preferably, the derivation of H′ from H includes performing Gaussian elimination on H, for example in order to set equal to zero the first m′ elements of the columns of H that correspond to the n−n′ bits of the codeword that are not read from the storage medium, in which case H′ is m′ rows of the resulting matrix without the zeroed-out columns.

Preferably, if the attempt to decode only the n′ bits of the representation of the codeword using H′ fails, then an attempt is made to decode the originally read n′ bits together with one or more additional bits of the representation of the codeword, using a matrix H′″ that has more columns than H′. If necessary, the one or more additional bits of the representation of the codeword are read from the storage medium. If all n−n′ remaining bits of the representation of the codeword have been read from the storage medium and have been combined with the n′ originally read bits, then H′″ is identical to H. Otherwise, H′″ has fewer columns than H.

A decoder, for decoding a codeword of n bits that was produced by encoding k information bits according to a code with which is associated a parity check matrix of n columns and m≧n−k rows and that was stored in its entirety in a storage medium, with at least n′<n bits of a representation of the codeword having been read from the storage medium, includes a decoding module and preferably also a feedback module. The decoding module is for attempting to decode only the n′ bits of the representation of the codeword, using a matrix H′ that has fewer columns than H. The feedback module is for requesting one or more additional bits of the representation of the codeword in case the decoding attempt by the decoding module fails.

BRIEF DESCRIPTION OF THE DRAWINGS

Various embodiments are herein described, by way of example only, with reference to the accompanying drawings, wherein:

FIG. 1 shows how a LDPC code can be represented as either a sparse parity check matrix or as a Tanner graph;

FIG. 2 illustrates the transformation of a parity check matrix H to a smaller matrix H′ for decoding a punctured codeword;

FIGS. 3 and 4 are simplified schematic high-level block diagrams of decoders for efficient decoding of representations of punctured codewords;

FIG. 5 is a high-level schematic block diagram of a flash memory device whose controller includes the decoder of FIG. 3 or the decoder of FIG. 4;

FIG. 6 is a detail of FIG. 5;

FIG. 7 is a high-level schematic block diagram of a memory system in which most of the functionality of the controller of FIG. 5 is emulated by software;

FIG. 8 is a high-level schematic block diagram of a communication system whose receiver includes the decoder of FIG. 3 or the decoder of FIG. 4;

FIGS. 9 and 10 are simplified schematic high-level block diagrams of decoders for decoding partially read representations of unpunctured codewords.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

The principles and operation of efficient decoding of a punctured codeword may be better understood with reference to the drawings and the accompanying description.

Denote the order of H as m×n, i.e. H has m rows and n columns. H is a parity check matrix of a code C, which of course implies that c is of length n (i.e. c has n elements). A punctured codeword c′ is derived from c by deleting some predefined coordinates of c. Denote the length of c′ by n′. Of course, n′<n. The set of all punctured codewords is itself a code, denoted C′. Preferably, the information bits of the original code C are not punctured, so that the punctured code C′ has the same size (i.e. the same number of codewords) as C, but has fewer redundancy bits.

Given H, c′, n, m and n′, a reduced matrix code H′ is computed, such that if c is a codeword satisfying equation (2) then the punctured sub-codeword c′ satisfies

H′c′=0  (3)

A matrix H′ constructed as described below has fewer rows and columns than H, so that decoding of c′ according to equation (3) is easier and less complex then applying erasure decoding to equation (2).

Given H of order m×n, and given c′ of length n′, a matrix H′ of order m′×n′ is computed, where r is the rank of the submatrix H_(p) of H that is composed of the n−n′ columns that correspond to the n−n′ punctured bits. Usually, r=n−n′ so that m′=m−(n−n′).

H′ is computed by performing a Gaussian elimination algorithm on the matrix H, with the goal of achieving all O-s in a selected m′ rows of H, for example in the first m′ rows of H, in all the columns associated with the punctured bits of c. After achieving this goal, and denoting the modified matrix by H″, the first m′ rows of H″ represent a reduced code, and the punctured bits do not participate in the code, since they are all multiplied by 0 in all the check equations.

Therefore the reduced code can be represented by taking only the first m′ rows of H″, and the n′ columns of H″ associated with non-punctured bits. H′ is those first m′ rows of H″ without the columns of H″ that are zeroed in the first m′ rows of H″ and that correspond to punctured bits. For example, if n=4096 and bits 4000, 4010, 4020, 4030 and 4040 of c are punctured (n′=4091), the columns of H″ that are zeroed in the first m′ rows of H″ are columns 4000, 4010, 4020, 4030 and 4040, and H′ is the first m′ rows of H″ without columns 4000, 4010, 4020, 4030 and 4040.

For example consider a code whose parity check matrix H has the form shown in FIG. 2. In this case the submatrices related to the punctured bits in the lower part of the matrix and the upper part of the matrix have the same structure, therefore replacing the upper half of the matrix with the sum (modulo 2) of the upper and lower halves of the matrix generates a matrix H″ with all 0-s in the first m′ rows of the columns associated with the punctured bits. Because only row operations are performed in order to generate H″ from H, both H and H″ span the same linear subspace and both H and H″ are parity-check matrices of the code C. H′ is derived from H″ by eliminating all but the first m′ rows of H″ and the first n′ columns of H″, resulting in a (m−m′)×n′ parity-check matrix of the punctured code C′.

Moreover, in this example the matrix H′ is derived with a minimal number of row operations applied to each row (in this case one operation per row). Hence, the number of 1's in each row of H′ is at most twice the number of 1's in a row of H. If H is sparse then H′ usually can be considered as sparse. Therefore, if the original code is an LDPC code, the reduced code H′ usually can also be regarded as an LDPC code, thus it can be decoded efficiently, by generating the Tanner graph of the code and performing a message passing algorithm.

In most implementations, a limit is set on the number of row operations performed on H, in order to preserve certain properties, such as sparseness.

FIG. 3 is a simplified schematic high-level block diagram of a decoder 60 for implementing the efficient punctured decoding described above. Punctured decoder 60 includes a code reduction module 62 and a decoder module 64. The inputs to punctured decoder 60 are the code matrix H and the (possibly noisy and corrupted) representation of the sub-codeword c′. The reduced code matrix H′ is computed in code reduction module 62 (preferably once, and then stored in a local volatile or nonvolatile memory (not shown)), and H′ is then provided to decoder module 64, together with the representation of sub-codeword c′. The output of decoder module 64 is the decoded codeword, which includes the information content of the original sub-codeword c′. This information is equal to the information content of the original codeword c.

FIG. 4 is a simplified schematic high-level block diagram of another decoder 80 for implementing the efficient punctured decoding described above. In addition to a code reduction module 82 and a decoder module 84, decoder 80 includes a non-volatile memory 86 for storing the code matrix H. The inputs to decoder 80 are the (possibly noisy and corrupted) representation of the sub-codeword c′ and information, such as the indices of the bits of c that were punctured to create c′, that tells code reduction module 82 which columns of H to zero out in the first m′ rows of H in order to create H″. Code reduction module 82 computes H′ as needed and preferably stores H′ locally, either in memory 86 or in a local non-volatile memory (not shown). As in decoder 60, H′ is provided to decoder module 84 together with the representation of sub-codeword c′. The output of decoder module 84 is the decoded codeword.

Code reduction modules 62 and 82 and decoder modules 64 and 84 may be implemented in hardware, in firmware, in software, or in combinations thereof, as is known in the art.

FIG. 5 is a high-level schematic block diagram of a flash memory device. A memory cell array 1 including a plurality of memory cells M arranged in a matrix is controlled by a column control circuit 2, a row control circuit 3, a c-source control circuit 4 and a c-p-well control circuit 5. Column control circuit 2 is connected to bit lines (BL) of memory cell array 1 for reading data stored in the memory cells (M), for determining a state of the memory cells (M) during a writing operation, and for controlling potential levels of the bit lines (BL) to promote the writing or to inhibit the writing. Row control circuit 3 is connected to word lines (WL) to select one of the word lines (WL), to apply read voltages, to apply writing voltages combined with the bit line potential levels controlled by column control circuit 2, and to apply an erase voltage coupled with a voltage of a p-type region on which the memory cells (M) are formed. C-source control circuit 4 controls a common source line connected to the memory cells (M). C-p-well control circuit 5 controls the c-p-well voltage.

The data stored in the memory cells (M) are read out by column control circuit 2 and are output to external I/O lines via an I/O line and a data input/output buffer 6. Program data to be stored in the memory cells are input to data input/output buffer 6 via the external I/O lines, and are transferred to column control circuit 2. The external I/O lines are connected to a controller 20.

Command data for controlling the flash memory device are input to a command interface connected to external control lines which are connected with controller 20. The command data inform the flash memory of what operation is requested. The input command is transferred to a state machine 8 that controls column control circuit 2, row control circuit 3, c-source control circuit 4, c-p-well control circuit 5 and data input/output buffer 6. State machine 8 can output a status data of the flash memory such as READY/BUSY or PASS/FAIL.

Controller 20 is connected or connectable with a host system such as a personal computer, a digital camera, a personal digital assistant. It is the host which initiates commands, such as to store or read data to or from the memory array 1, and provides or receives such data, respectively. Controller 20 converts such commands into command signals that can be interpreted and executed by command circuits 7. Controller 20 also typically contains buffer memory for the user data being written to or read from the memory array. A typical memory device includes one integrated circuit chip 21 that includes controller 20, and one or more integrated circuit chips 22 that each contains a memory array and associated control, input/output and state machine circuits. The trend, of course, is to integrate the memory array and controller circuits of such a device together on one or more integrated circuit chips. The memory device may be embedded as part of the host system, or may be included in a memory card that is removably insertable into a mating socket of host systems. Such a card may include the entire memory device, or the controller and memory array, with associated peripheral circuits, may be provided in separate cards.

FIG. 6 is an enlarged view of part of FIG. 5, showing that controller 20 includes an encoder 52 for encoding user data received from the host as one or more punctured codewords, circuitry 54 for instructing command circuits 7 to store the punctured codewords in memory cell array 1 and for instructing command circuits 7 to retrieving the stored punctured codewords from memory cell array 1, and a decoder 30, that could be, for example, either decoder 60 of FIG. 3 or decoder 80 of FIG. 4, for decoding the representation of the punctured codewords as retrieved by circuitry 54.

RCPC conventionally is thought of as applicable only to time-varying communication channels. It is not commonly appreciated that memories such as flash memories, that become less and less reliable over time, also are time-varying corrupting media. Controller 20 initially uses a relatively large number of punctured bits, and gradually reduces that number as memory cell array 1 becomes less reliable over time.

FIG. 7 is a high-level block diagram of a system 100 in which most of the functionality of controller 20 is effected by software. System 100 includes a processor 102 and four memory devices: a RAM 104, a boot ROM 106, a mass storage device (hard disk) 108 and a modified flash memory device of FIG. 5 as a flash memory device 112, all communicating via a common bus 114. The difference between the flash memory device of FIG. 5 and flash memory device 112 is that the controller of flash memory device 112 functions only as an interface to bus 114; the rest of the functionality of controller 20 of FIG. 5 as described above is emulated by flash memory driver code 110 that is stored in mass storage device 108 and that is executed by processor 102 to interface between user applications executed by processor 102 and flash memory device 112, and to manage the flash memory of flash memory device 112. In addition to the conventional functionality of such flash management driver code, driver code 110 emulates the functionality of controller 20 of FIG. 5 with respect to punctured encoding and decoding of codewords that are stored in memory cell array 1 and that are read from memory cell array 1, as described above. Driver code 110 typically is included in operating system code for system 100 but also could be freestanding code.

The components of system 100 other than flash memory device 112 constitute a host 120 of flash memory device 112. Mass storage device 108 is an example of a computer-readable storage medium bearing computer-readable driver code for efficient punctured decoding as described above. Other examples of such computer-readable storage media include read-only memories such as CDs bearing such code.

Although the methods and the decoders disclosed herein are intended primarily for use in data storage systems, these methods and decoders also are applicable to communications systems, particularly communications systems that rely on wave propagation through noisy transmission media.

FIG. 8 is a high-level schematic block diagram of a communication system 200 that includes a transmitter 210, a channel 203 and a receiver 212. Transmitter 210 includes an encoder 201 and a modulator 202. Receiver 212 includes a demodulator 204 and decoder 206 that could be, for example, either decoder 60 of FIG. 3 or decoder 80 of FIG. 4. Encoder 201 receives a message and generates a corresponding punctured codeword. Modulator 202 subjects the generated punctured codeword to a digital modulation such as BPSK, QPSK or multi-valued QAM and transmits the resulting modulated signal to receiver 212 via channel 203. At receiver 212, demodulator 204 receives the modulated signal from channel 203 and subjects the received modulated signal to a digital demodulation such as BPSK, QPSK or multi-valued QAM. Decoder 206 decodes the resulting representation of the original punctured codeword as described above.

In a variant of the method described above, that is applicable to data storage systems but not to communication systems, the full codeword c, of n bits, rather than a punctured codeword c′ of n′<n bits, is stored in the storage medium. To save time in decoding, only n′ bits of the representation of the codeword are decoded as described above for the punctured codeword c′ of n′ bits. In other words, instead of selecting n−n′ bits to puncture prior to storing the codeword, n−n′ bits are selected to ignore when decoding the representation of the codeword. If the decoding of the n′ bits fails, then one or more of the remaining bits are combined with the n′ bits that were decoded initially, and the decoding is attempted again. n′ is selected such that the decoding of only n′ bits is expected to succeed almost all the time, so that this procedure saves time over always decoding the full n bits. Normally, only the n′ bits are read back (initially) from the data storage system; but, optionally, more than n′ bits, indeed as many as all n bits, may be read back from the storage system before decoding the n′ bits, because most of the savings in time is associated with decoding only n′ bits, not with reading only n′ bits.

In one sub-variant, if decoding with n′ bits fails, whatever bits of the representation of the codeword remain unread are read from the storage medium, if necessary, and the full matrix H is used to decode all n bits. In another sub-variant, if decoding with n′ bits fails, the decoding is repeated using a matrix H′″ that has more rows and columns than H′ but fewer rows and columns than H and that is derived from H similarly to how H′ was derived from H but with more than m′ rows and more than n′ columns, after reading from the storage medium whatever additional bits of the representation of the codeword are needed and have not yet been read. Specifically, if j<n−n′ more bits of the representation of c are combined with the n′ initial bits then H′″ has m′+r(j) rows and n′+j columns, where r(j) is the rank of the submatrix of H that is composed of the columns of H corresponding to the j additional bits.

Failure criteria for decoding by iterative message passing are well-known in the art and need not be elaborated in detail herein. Such criteria include failure to converge to a valid codeword after a predetermined number of iterations, failure to converge to a valid codeword by a predetermined time, and, in decoding by message passing, failure to converge to a valid codeword after a predetermined number of exchanges of messages.

FIG. 9 is a simplified schematic high-level block diagram of the decoder of FIG. 3 as modified to implement this variant of the method described above. A decoder 160 includes a code reduction module 162, a decoder module 164 and a feedback module 166. The inputs to decoder 160 are the code matrix H and n′ bits of the (possibly noisy and corrupted) representation of the codeword c. The reduced code matrix H′ is computed in code reduction module 162 (preferably once, and then stored in a local volatile or nonvolatile memory (not shown)), and H′ is then provided to decoder module 164 together with the n′ bits of the representation of the codeword c. If decoder module 164 succeeds in decoding the n′ input bits of the representation of the codeword c then the output of decoder module 164 is the decoded codeword, which includes the information content of the original codeword c.

If decoder module 164 fails to decode the n′ input bits of the representation of the codeword c then decoder module 164 notifies feedback module 166 of that failure. Feedback module 166 requests that decoder 160 be provided with one or more additional bits to combine with the original n′ bits. If necessary, the one or more additional bits of the representation of the codeword are read from the storage medium. n′ is incremented correspondingly, code reduction module 162 computes a reduced code matrix H′″ that has more rows and columns than H′, and decoder module 164 attempts to use H′″ to decode the available bits of the representation of the codeword. If necessary, all the remaining bits of the representation of the codeword are provided to decoder 160 and decoder module 162 uses the full matrix H to decode all the bits of the representation of the codeword.

FIG. 10 is a simplified schematic high-level block diagram of the decoder of FIG. 4 as modified to implement this variant of the method described above. In addition to a code reduction module 182, a decoder module 184 and a feedback module 186, a decoder 180 includes a non-volatile memory 188 for storing the code matrix H. The inputs to decoder 180 are n′ bits of the (possibly noisy and corrupted) representation of the codeword c and information, such as which n′−n bits of c were omitted from c′, that tells code reduction module 182 which columns of H to zero out in the first m′ rows of H in order to create H″. Code reduction module 182 computes H′ as needed and preferably stores H′ locally, either in memory 188 or in a local non-volatile memory (not shown). As in decoder 160, H′ is then provided to decoder module 184 together with the n′ bits of the representation of the codeword c. If decoder module 184 succeeds in decoding the n′ input bits of the representation of the codeword c then the output of decoder module 184 is the decoded codeword, which includes the information content of the original codeword c.

Also as in decoder 160, if decoder module 184 fails to decode the n′ input bits of the representation of the codeword c then decoder module 184 notifies feedback module 186 of that failure. Feedback module 186 requests that decoder 180 be provided with one or more additional bits to combine with the original n′ bits. If necessary, the one or more additional bits of the representation of the codeword are read from the storage medium. n′ is incremented correspondingly, code reduction module 182 computes a reduced code matrix H′″ that has more rows and columns than H′, and decoder module 184 attempts to use H′″ to decode the available bits of the representation of the codeword. If necessary, all the remaining bits of the representation of the codeword are provided to decoder 180 and decoder module 182 uses the full matrix H to decode all the bits of the representation of the codeword.

Like code reduction modules 62 and 82 and decoder modules 64 and 84, code reduction modules 162 and 182, decoder modules 164 and 184 and feedback modules 166 and 186 can be implemented in hardware, in firmware, in software, or in combinations thereof, as is known in the art.

FIGS. 5 and 6 serve to illustrate a flash memory device based on this variant of the method described above, with the understanding that decoder 30 of FIG. 6 is a decoder appropriate for this variant of the method described above. For example, decoder 30 could be either decoder 160 of FIG. 9 or decoder 180 of FIG. 10. Similarly, FIG. 7 serves to illustrate a system in which most of the functionality of controller 20 of a flash memory device based on this variant of the method described above, and in particular the functionality of a decoder such as decoder 160 of FIG. 9 or decoder 180 of FIG. 10, is effected by software.

A limited number of embodiments of methods for punctured decoding, and of devices and systems that use the methods, have been described. It will be appreciated that many variations, modifications and other applications of the methods, devices and system may be made. 

1. A method of storing and retrieving k information bits, comprising: (a) encoding the information bits according to a code with which is associated a parity check matrix H that has n columns, thereby producing a codeword of n bits; (b) storing the entire codeword in a storage medium; (c) reading at least n′<n bits of a representation of the codeword from the storage medium; and (d) attempting to decode only the n′ bits of the representation of the codeword using a matrix H′ that has fewer columns than H.
 2. The method of claim 1, wherein the code is a block code.
 3. The method of claim 1, wherein the decoding includes exchanging messages between the rows of H′ and the columns of H′.
 4. The method of claim 1, wherein H has m=n−k rows and wherein H′ has m′=m−(n−n′) rows and n′ columns.
 5. The method of claim 4, further comprising: (e) deriving H′ from H.
 6. The method of claim 5, wherein the deriving of H′ from H is effected by steps including performing Gaussian elimination on H.
 7. The method of claim 6, wherein the Gaussian elimination is performed to set equal to zero elements 1 through m′ of the columns of H that correspond to the bits of the representation of the codeword that are not read from the storage medium, thereby producing a matrix H″, H′ then being rows 1 through m′ of H″ without the columns that correspond to the bits of the representation of the codeword that are not read from the storage medium.
 8. The method of claim 1, further comprising: (e) if the attempting to decode only the n′ bits of the representation of the codeword using H′ fails: attempting to decode the n′ bits of the representation of the codeword together with at least one more bit of the representation of the codeword, using a matrix H′″ that has more columns than H′.
 9. The method of claim 8, further comprising: (f) if the attempting to decode only the n′ bits of the representation of the codeword using H′ fails: reading the at least one more bit of the representation of the codeword from the storage medium.
 10. The method of claim 8, wherein, if the attempting to decode only the n′ bits of the representation of the codeword using H′ fails, H′″ is identical to H, and the attempt to decode the n′ bits of the representation of the codeword together with the at least one more bit of the representation of the codeword is an attempt to decode all n bits of the representation of the codeword using H.
 11. The method of claim 8, wherein n′<n−1, and wherein, if the attempting to decode only the n′ bits of the representation of the codeword using H′ fails, H′″ has fewer columns than H, and the attempt to decode the n′ bits of the representation of the codeword together with the at least one more bit of the representation of the codeword is an attempt to decode fewer than all n bits of the representation of the codeword using H′″.
 12. A memory device, comprising: (a) a memory; and (b) a controller for storing information bits in the memory and for recovering the information bits from the memory, the controller including: (i) an encoder for encoding the information bits according to a code with which is associated a parity check matrix H that has n columns, thereby producing a codeword of n bits, (ii) circuitry for storing the entire codeword in the memory and for reading at least n′<n bits of a representation of the codeword from the memory, and (iii) a decoder for attempting to decode only the n′<n bits of the representation of the codeword, the decoding being effected using a matrix H′ that has fewer columns than H.
 13. A system comprising: (a) a first memory; and (b) a host of the first memory including: (i) a second memory having stored therein code for managing the first memory by steps including: (A) encoding information bits according to a code with which is associated a parity check matrix H that has n columns, thereby producing a codeword of n bits, (B) storing the entire codeword in the first memory, (C) reading at least n′<n bits of a representation of the codeword from the first memory, and (D) attempting to decode only the n′ bits of the representation of the codeword using a matrix H′ that has fewer columns than H, and (ii) a processor for executing the code.
 14. The system of claim 13, wherein the code for managing the first memory also includes code for deriving H′ from H.
 15. A computer-readable storage medium having embodied thereon computer-readable code for managing a memory, the computer-readable code comprising: (a) program code for encoding information bits according to a code with which is associated a parity check matrix H that has n columns, thereby producing a codeword of n bits; (b) program code for storing the entire codeword in the memory; (c) program code for reading at least n′<n bits of a representation of the codeword from the memory; and (d) program code for attempting to decode only the n′ bits of the representation of the codeword using a matrix H′ that has fewer columns than H.
 16. The computer-readable storage medium of claim 15, wherein the computer-readable code further comprises: (e) program code for deriving H′ from H.
 17. A method of recovering k information bits that have been encoded as a codeword of n bits according to a code with which is associated a parity check matrix H that has n columns, the entire codeword having been stored in a storage medium, the method comprising: (a) reading at least n′<n bits of a representation of the codeword from the storage medium; and (b) attempting to decode only the n′ bits of the representation of the codeword using a matrix H′ that has fewer columns than H.
 18. The method of claim 17, wherein the code is a block code.
 19. The method of claim 17, wherein the decoding includes exchanging messages between the rows of H′ and the columns of H′.
 20. The method of claim 17, wherein H has m=n−k rows and wherein H′ has m′=m−(n−n′) rows and n′ columns.
 21. The method of claim 20, further comprising: (e) deriving H′ from H.
 22. The method of claim 21, wherein the deriving of H′ from H is effected by steps including performing Gaussian elimination on H.
 23. The method of claim 22, wherein the Gaussian elimination is performed to set equal to zero elements 1 through m′ of the columns of H that correspond to the bits of the representation of the codeword that are not read from the storage medium, thereby producing a matrix H″, H′ then being rows 1 through m′ of H″ without the columns that correspond to the bits of the representation of the codeword that are not read from the storage medium.
 24. The method of claim 17, further comprising: (c) if the attempting to decode only the n′ bits of the representation of the codeword using H′ fails: attempting to decode the n′ bits of the representation of the codeword together with at least one more bit of the representation of the codeword, using a matrix H′″ that has more columns than H′.
 25. The method of claim 24, further comprising: (d) if the attempting to decode only the n′ bits of the representation of the codeword using H′ fails: reading the at least one more bit of the representation of the codeword from the storage medium.
 26. The method of claim 24, wherein, if the attempting to decode only the n′ bits of the representation of the codeword using H′ fails, H′″ is identical to H, and the attempt to decode the n′ bits of the representation of the codeword together with the at least one more bit of the representation of the codeword is an attempt to decode all n bits of the representation of the codeword using H.
 27. The method of claim 24, wherein n′<n−1, and wherein, if the attempting to decode only the n′ bits of the representation of the codeword using H′ fails, H′″ has fewer columns than H, and the attempt to decode the n′ bits of the representation of the codeword together with the at least one more bit of the representation of the codeword is an attempt to decode fewer than all n bits of the representation of the codeword using H′″.
 28. A decoder for decoding a codeword of n bits, the codeword having been produced by encoding information bits according to a code with which is associated a parity check matrix that has n columns, the entire codeword having been stored in a storage medium, at least n′<n bits of a representation of the codeword having been read from the storage medium, the decoder comprising: (a) a decoding module for attempting to decode only the n′ bits of the representation of the codeword using a matrix H′ that has fewer columns than H.
 29. The decoder of claim 28, further comprising: (b) a feedback module for requesting at least one more bit of the representation of the codeword in case the decoding fails. 